<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>Java反射机制 | 海晨忆的博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  
  
  <meta name="description" content="简介&amp;emsp;&amp;emsp;在运行过程中，对任意一个类，都能知道这个类的所有属性和方法。对于任一个对象，都能调用他的任意一个方法和属性。这种动态获取信息以及动态调用对象的方法称为java语言的反射机制">
<meta property="og:type" content="article">
<meta property="og:title" content="Java反射机制">
<meta property="og:url" content="https://haichenyi.com/2018/03/06/Java反射机制/index.html">
<meta property="og:site_name" content="海晨忆的博客">
<meta property="og:description" content="简介&amp;emsp;&amp;emsp;在运行过程中，对任意一个类，都能知道这个类的所有属性和方法。对于任一个对象，都能调用他的任意一个方法和属性。这种动态获取信息以及动态调用对象的方法称为java语言的反射机制">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-03-06T13:07:08.281Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Java反射机制">
<meta name="twitter:description" content="简介&amp;emsp;&amp;emsp;在运行过程中，对任意一个类，都能知道这个类的所有属性和方法。对于任一个对象，都能调用他的任意一个方法和属性。这种动态获取信息以及动态调用对象的方法称为java语言的反射机制">
  
    <link rel="alternate" href="/atom.xml" title="海晨忆的博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/uploads/artistic_image/head.jpg">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/css/highlight.css">
  <script>
  let antiquityStorage = window.sessionStorage.getItem('antiquitySessionStorage');
  if (antiquityStorage == '' || antiquityStorage == null) {
    var antiquityLoader = '<div id="loaderbox"><div class="loader"><div class="load-roll"><div class="load-top"></div><div class="load-right"></div><div class="load-bottom"></div></div></div></div>';
    document.write(antiquityLoader);
    document.body.style.overflow = 'hidden'
  }
  </script>
</head>

<body>
  <div id="fullpage" class="mobile-nav-right">
    
      <div id="wrapper" style="background-image: url(/uploads/artistic_image/bg.jpg)" title="背景图片来自网络">
    
    
      <header id="header">
  <div id="nav-toggle" class="nav-toggle"></div>
  <div class="head-box global-width">
    <nav class="nav-box nav-right">
      
        <a class="nav-item" href="/" title
        
        >首页</a>
      
        <a class="nav-item" href="/archives" title
        
        >归档</a>
      
        <a class="nav-item" href="/about" title
        
        >简历</a>
      
    </nav>
  </div>
</header>
      <div id="middlecontent" title class="global-width sidebar-left">
        <section id="main"><article id="post-Java反射机制" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 class="article-title" itemprop="name">
      Java反射机制
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2018/03/06/Java反射机制/" class="article-date">
  <time datetime="2018-03-06T13:01:58.000Z" itemprop="datePublished">2018-03-06</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Android-常用功能/">Android -常用功能</a>
  </div>

    
  </div>
  
    <span id="busuanzi_container_page_pv">
      本文总阅读量<span id="busuanzi_value_page_pv"></span>次
    </span>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <h2 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h2><p>&emsp;&emsp;在运行过程中，对任意一个类，都能知道这个类的所有属性和方法。对于任一个对象，都能调用他的任意一个方法和属性。这种动态获取信息以及动态调用对象的方法称为java语言的反射机制</p>
<a id="more"></a>
<h2 id="用法"><a href="#用法" class="headerlink" title="用法"></a>用法</h2><p>我这里就列出我常用的两个方法私有类和变量</p>
<h3 id="方法Methods"><a href="#方法Methods" class="headerlink" title="方法Methods"></a>方法Methods</h3><table>
<thead>
<tr>
<th style="text-align:center">方法</th>
<th style="text-align:center">用途</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">getDeclaredMethods()</td>
<td style="text-align:center">获取当前类的所有方法，包括public/private/protected/default修饰的方法</td>
</tr>
<tr>
<td style="text-align:center">getDeclaredMethod(String name, Class&lt;?&gt;… parameterTypes)</td>
<td style="text-align:center">获取当前类的某一个方法,包括public/private/protected/default修饰的方法</td>
</tr>
<tr>
<td style="text-align:center">getMethods()</td>
<td style="text-align:center">获取当前类和所继承父类的public标识的所有方法，仅仅包括public</td>
</tr>
<tr>
<td style="text-align:center">getMethod(String name, Class&lt;?&gt;… parameterTypes)</td>
<td style="text-align:center">获取当前类和所继承父类的public标识的某一个方法，仅仅包括public</td>
</tr>
</tbody>
</table>
<p>&emsp;&emsp;上面就是两个类型的方法，一个是只获取当前类的方法，获取当前类的方法，包括所有类型的方法：public/private/protected/default。还有一个是获取当前类和所继承的父类的方法，仅仅包括public修饰的方法。</p>
<h4 id="调用方式"><a href="#调用方式" class="headerlink" title="调用方式"></a>调用方式</h4><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">//在TakePhotoActivity.class类中有两个重载方法，一个无参，一个有一个String类型的参数</span><br><span class="line">private void myTest()&#123;</span><br><span class="line">    Log.v(&quot;WZ&quot;,&quot;myTest无参&quot;);</span><br><span class="line">  &#125;</span><br><span class="line">private void myTest(String msg)&#123;</span><br><span class="line">    Log.v(&quot;WZ&quot;,&quot;myTest有参&quot;);</span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure></div>
<h5 id="调用无参的方法"><a href="#调用无参的方法" class="headerlink" title="调用无参的方法"></a>调用无参的方法</h5><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">TakePhotoActivity takePhotoActivity = new TakePhotoActivity();//new 一个类对象</span><br><span class="line">try &#123;</span><br><span class="line">Class&lt;? extends TakePhotoActivity&gt; aClass1 = takePhotoActivity.getClass();//通过getClass方法获取类对象</span><br><span class="line">//Class&lt;?&gt; aClass = Class.forName(&quot;com.haichenyi.mytakephoto.TakePhotoActivity&quot;);//通过路径获取Class对象</span><br><span class="line">Method myTest = aClass1.getDeclaredMethod(&quot;myTest&quot;);</span><br><span class="line">myTest.setAccessible(true);//参数值为true，禁止访问控制检查</span><br><span class="line">myTest.invoke(takePhotoActivity);//执行私有方法</span><br><span class="line">&#125; catch (Exception e) &#123;</span><br><span class="line">      e.printStackTrace();</span><br><span class="line">      Log.v(&quot;WZ&quot;, e.getMessage());</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure></div>
<h5 id="调用有参的方法"><a href="#调用有参的方法" class="headerlink" title="调用有参的方法"></a>调用有参的方法</h5><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">TakePhotoActivity takePhotoActivity = new TakePhotoActivity();//new 一个类对象</span><br><span class="line">Class[] arr = new Class[]&#123;String.class&#125;;</span><br><span class="line">try &#123;</span><br><span class="line">Class&lt;? extends TakePhotoActivity&gt; aClass1 = takePhotoActivity.getClass();//通过getClass方法获取类对象</span><br><span class="line">//Class&lt;?&gt; aClass = Class.forName(&quot;com.haichenyi.mytakephoto.TakePhotoActivity&quot;);//通过路径获取Class对象</span><br><span class="line">Method myTest = aClass1.getDeclaredMethod(&quot;myTest&quot;,arr);</span><br><span class="line">myTest.setAccessible(true);//参数值为true，禁止访问控制检查</span><br><span class="line">myTest.invoke(takePhotoActivity,&quot;s&quot;);//执行私有方法</span><br><span class="line">&#125; catch (Exception e) &#123;</span><br><span class="line">      e.printStackTrace();</span><br><span class="line">      Log.v(&quot;WZ&quot;, e.getMessage());</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure></div>
<p>有参的方法，在获取方法的时候，传一个Class[]数组，里面的值就是参数类型的类。或者还有另一种传的方法，前面获取方法的时候：</p>
<ol>
<li>获取方法的时候，无参的传一个空的Class[]，有参就传有值的Class[]数组</li>
<li>执行方法的时候，无参的传一个空的Object[]，有参就传有值的Object[]数组,至于传的值随便写，类型一样就行</li>
</ol>
<h3 id="变量Field"><a href="#变量Field" class="headerlink" title="变量Field"></a>变量Field</h3><table>
<thead>
<tr>
<th style="text-align:center">方法</th>
<th style="text-align:center">用途</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">getDeclaredFields()</td>
<td style="text-align:center">获取当前类的所有类型的全局变量,包括public/private/protected/default修饰的变量</td>
</tr>
<tr>
<td style="text-align:center">getDeclaredField(String name)</td>
<td style="text-align:center">获取当前类的某一个类型的全局变量,包括public/private/protected/default修饰的变量</td>
</tr>
<tr>
<td style="text-align:center">getFields()</td>
<td style="text-align:center">获取当前类和继承父类的所有用public修饰的变量</td>
</tr>
<tr>
<td style="text-align:center">getField(String name)</td>
<td style="text-align:center">获取当前类和继承父类的某一个用public修饰的变量</td>
</tr>
</tbody>
</table>
<h4 id="调用方式-1"><a href="#调用方式-1" class="headerlink" title="调用方式"></a>调用方式</h4><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">//在TakePhotoActivity里面定义</span><br><span class="line">private int flag;</span><br></pre></td></tr></table></figure></div>
<h5 id="获取变量"><a href="#获取变量" class="headerlink" title="获取变量"></a>获取变量</h5><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">TakePhotoActivity takePhotoActivity = new TakePhotoActivity();//new 一个类对象</span><br><span class="line">try &#123;</span><br><span class="line">Class&lt;? extends TakePhotoActivity&gt; aClass1 = takePhotoActivity.getClass();//通过getClass方法获取类对象</span><br><span class="line">//Class&lt;?&gt; aClass = Class.forName(&quot;com.haichenyi.mytakephoto.TakePhotoActivity&quot;);//通过路径获取Class对象</span><br><span class="line">Field flag = aClass.getDeclaredField(&quot;flag&quot;);</span><br><span class="line">flag.setAccessible(true);</span><br><span class="line">Object o = flag.get(takePhotoActivity);//这里就获取到了对象</span><br><span class="line">...//做你自己的逻辑处理</span><br><span class="line">&#125; catch (Exception e) &#123;</span><br><span class="line">      e.printStackTrace();</span><br><span class="line">      Log.v(&quot;WZ&quot;, e.getMessage());</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure></div>
<h5 id="设置变量的值"><a href="#设置变量的值" class="headerlink" title="设置变量的值"></a>设置变量的值</h5><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">//获取变量的值跟上面一样</span><br><span class="line">flag.set(takePhotoActivity,10);//这样写会改变TakePhotoActivity中flag的值</span><br></pre></td></tr></table></figure></div>
<h2 id="工具类"><a href="#工具类" class="headerlink" title="工具类"></a>工具类</h2><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br></pre></td><td class="code"><pre><span class="line">import java.lang.reflect.Field;</span><br><span class="line">import java.lang.reflect.InvocationTargetException;</span><br><span class="line">import java.lang.reflect.Method;</span><br><span class="line">/**</span><br><span class="line"> * Author: 海晨忆.</span><br><span class="line"> * Date: 2018/3/6</span><br><span class="line"> * Desc: 反射工具类</span><br><span class="line"> */</span><br><span class="line">public class ReflectionUtil &#123;</span><br><span class="line"></span><br><span class="line">    /***</span><br><span class="line">     * 获取私有成员变量的值</span><br><span class="line">     * </span><br><span class="line">     */</span><br><span class="line">    public static Object getValue(Object instance, String fieldName)</span><br><span class="line">            throws IllegalAccessException, NoSuchFieldException &#123;</span><br><span class="line"></span><br><span class="line">        Field field = instance.getClass().getDeclaredField(fieldName);</span><br><span class="line">        field.setAccessible(true); // 参数值为true，禁止访问控制检查</span><br><span class="line"></span><br><span class="line">        return field.get(instance);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /***</span><br><span class="line">     * 设置私有成员变量的值</span><br><span class="line">     * </span><br><span class="line">     */</span><br><span class="line">    public static void setValue(Object instance, String fileName, Object value)</span><br><span class="line">            throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException &#123;</span><br><span class="line"></span><br><span class="line">        Field field = instance.getClass().getDeclaredField(fileName);</span><br><span class="line">        field.setAccessible(true);</span><br><span class="line">        field.set(instance, value);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /***</span><br><span class="line">     * 访问私有方法</span><br><span class="line">     * </span><br><span class="line">     */</span><br><span class="line">    public static Object callMethod(Object instance, String methodName, Class[] classes, Object[] objects)</span><br><span class="line">            throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException,</span><br><span class="line">            InvocationTargetException &#123;</span><br><span class="line"></span><br><span class="line">        Method method = instance.getClass().getDeclaredMethod(methodName, classes);</span><br><span class="line">        method.setAccessible(true);</span><br><span class="line">        return method.invoke(instance, objects);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></div>
      
    </div>
    
      <footer class="article-footer">
        完
      </footer>
    
  </div>
  
    
<nav id="article-nav">
  <div class="article-nav-block">
    
      <a href="/2018/03/06/Java-设计模式（Design-Patterns）（一）/" id="article-nav-newer" class="article-nav-link-wrap">
        <strong class="article-nav-caption"></strong>
        <div class="article-nav-title">
          
            Java 设计模式（Design Patterns）（一）
          
        </div>
      </a>
    
  </div>
  <div class="article-nav-block">
    
      <a href="/2018/03/06/EventBus源码解析-一-——获取EventBus对象/" id="article-nav-older" class="article-nav-link-wrap">
        <div class="article-nav-title">EventBus源码解析(一)——获取EventBus对象</div>
        <strong class="article-nav-caption"></strong>
      </a>
    
  </div>
</nav>

    
  
  
</article>
</section>
        <aside id="sidebar">
  
    <div class="widget-box">
  <div class="avatar-box avatar-item">
    <img class="avatar" src="/uploads/artistic_image/head.jpg" title="头像来自网络"></img>
    <h3 class="avatar-name">
      
        海晨忆
      
    </h3>
    <p class="avatar-slogan">
      先谋生，再谋爱。人间值得，未来可期。
    </p>
  </div>
</div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Android-Socket/">Android -Socket</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-加密算法/">Android -加密算法</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-常用功能/">Android -常用功能</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-框架/">Android -框架</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-源码解析/">Android -源码解析</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-自定义view/">Android -自定义view</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-设计模式/">Android -设计模式</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/JAVA-并发/">JAVA -并发</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java-SpringBoot/">Java -SpringBoot</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Tomcat/">Tomcat</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/kotlin/">kotlin</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据库-JDBC/">数据库 -JDBC</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据库-MySQL/">数据库 -MySQL</a></li></ul>
    </div>
  </div>


  
    

  
    
  
    
  <div class="widget-box">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/11/">November 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/10/">October 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/09/">September 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">August 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/">July 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">June 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/10/">October 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/05/">May 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">March 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">February 2018</a></li></ul>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2021/07/27/JAVA—公平锁，非公平锁，悲观锁，乐观锁，死锁/">JAVA—公平锁，非公平锁，悲观锁，乐观锁，死锁</a>
          </li>
        
          <li>
            <a href="/2021/07/19/JAVA—线程同步器AQS/">JAVA—线程同步器AQS</a>
          </li>
        
          <li>
            <a href="/2021/07/07/Android模拟点击/">Android模拟点击</a>
          </li>
        
          <li>
            <a href="/2019/11/27/SpringBoot系列-消息-RabbitMQ-（二十）/">SpringBoot系列-消息(RabbitMQ)（二十）</a>
          </li>
        
          <li>
            <a href="/2019/11/13/SpringBoot系列-Docker（十九）/">SpringBoot系列-Docker（十九）</a>
          </li>
        
      </ul>
    </div>
  </div>

  
      <div class="widget-box">
    <h3 class="widget-title">友情链接</h3>
    <div class="widget">
      
        <a class="hrf" style="display: block;" href="https://github.com/haichenyi" title target='_blank'
        >Github</a>
      
        <a class="hrf" style="display: block;" href="https://www.jianshu.com/u/6077ee440c37" title target='_blank'
        >简书</a>
      
        <a class="hrf" style="display: block;" href="https://blog.csdn.net/qq_27634797" title target='_blank'
        >CSDN</a>
      
    </div>
  </div>

  
</aside>
      </div>
      <footer id="footer">
  <div class="foot-box footers global-width">
    &copy;2017-2021 海晨忆 &nbsp;&nbsp;
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span id="busuanzi_container_site_pv">阁下是第<span id="busuanzi_value_site_pv"></span>个访客</span>
  </div>
</footer>
      <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
if (!window.jQuery) {
var script = document.createElement('script');
script.src = "/js/jquery-2.0.3.min.js";
document.body.write(script);
}
</script>

  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>



    </div>
    <nav id="mobile-nav" class="mobile-nav-box">
  <div class="mobile-nav-img mobile-nav-top"></div>
  
    <a href="/" class="mobile-nav-link">首页</a>
  
    <a href="/archives" class="mobile-nav-link">归档</a>
  
    <a href="/about" class="mobile-nav-link">简历</a>
  
  <div class="mobile-nav-img  mobile-nav-bottom"></div>
</nav>    
  </div>
</body>
</html>